﻿/*
 * 我自己自定义的异常过滤器
 * 5种
 * 只要继承对应的过滤器的接口即可
 * **/
using Microsoft.AspNetCore.Mvc.Filters;

namespace Max.PH5_2011A.API
{
    public class MyExceptionFilter : IExceptionFilter
    {
        public void OnException(ExceptionContext context)
        {
            //if (!context.ExceptionHandled)
            //{
                var log = NLog.LogManager.GetCurrentClassLogger();

                log.Error("出错啦，请联系管理员");

            //}
            //context.ExceptionHandled = true;

        }
    }
}
